package at.mensch;

public class Field {


	int fieldId = 0;
	String fieldTitle = null;
	String fieldImage = null;
	
	public String getFieldImage() {
		return fieldImage;
	}

	public void setFieldImage(String fieldImage) {
		this.fieldImage = fieldImage;
	}

	public String getFieldTitle() {
		return fieldTitle;
	}

	public void setFieldTitle(String fieldTitle) {
		this.fieldTitle = fieldTitle;
	}

	public int getFieldId() {
		return fieldId;
	}

	public void setFieldId(int fieldId) {
		this.fieldId = fieldId;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + fieldId;
		result = prime * result
				+ ((fieldImage == null) ? 0 : fieldImage.hashCode());
		result = prime * result
				+ ((fieldTitle == null) ? 0 : fieldTitle.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Field other = (Field) obj;
		if (fieldId != other.fieldId)
			return false;
		if (fieldImage == null) {
			if (other.fieldImage != null)
				return false;
		} else if (!fieldImage.equals(other.fieldImage))
			return false;
		if (fieldTitle == null) {
			if (other.fieldTitle != null)
				return false;
		} else if (!fieldTitle.equals(other.fieldTitle))
			return false;
		return true;
	}	
	
}
